package com.sca.core.common.base;


import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;


/**
 * @Author: user
 * @Date: 2021/10/9 10:50
 * @Description:
 */
@Data
public class PageParamDTO {
    @NotNull(message = "分页参数不能为空")
    @ApiModelProperty(value = "页码(不能为空)" , example = "1")
    protected Integer pageNum;

    @NotNull(message = "每页数量不能为空")
    @ApiModelProperty(value = "每页数量(不能为空)" , example = "10")
    @Max(value = 200, message = "每页最大为200")
    protected Integer pageSize;

    @ApiModelProperty("排序规则：true正序 | false 倒序")
    protected Boolean sort;

    @ApiModelProperty(value = "排序字段" , example = "id")
    protected String orderByField;

    @ApiModelProperty(value = "是否查询总条数" , example = "true")
    protected Boolean searchCount;

    @ApiModelProperty(value = "随机数")
    public Double random;
}
